package com.fm.jbsql.util;

import java.util.Comparator;
import java.io.File;

/**
 * Created by IntelliJ IDEA.
 * User: syaroshenko
 * Date: Jul 13, 2006
 * Time: 11:36:27 AM
 * Class is used to implement String comparator method (used in array sort)
 */

/**
 * Class is used to implement String comparator method (used in array sort).
 */
public final class StringComparator implements Comparator {
    /**
     * Function to comare two case insensitive Strings.
     * @param o1 first string
     * @param o2 second string
     * @return int
     */
    public int compare(Object o1, Object  o2) {
        String s1 = (String)o1;
        String s2 = (String)o2;
        return s1.compareToIgnoreCase(s2);       
    }
}
